package struct;

/**
 * 
 * @author Gabrielle DuBois
 */
public class Dependent extends DBObject{
    private String first;
    private String last;
    private String dob;
    private String skol;
    private String relSkol;
    private String pPhone;
    private String notes;

    /**
     * Constructor
     * @param firstName
     * @param lastName
     * @param dateOfBirth
     * @param schoolAttending
     * @param religiousSchooling
     * @param personalPhoneNumber
     * @param additionalNotes
     */
    public Dependent(String firstName, String lastName, String dateOfBirth,
                    String schoolAttending, String religiousSchooling,
                            String personalPhoneNumber, String additionalNotes){
        super(7,3);
        attributes = new String[numAttributes];
        attributes[0] = first = firstName;
        attributes[1] = last = lastName;
        attributes[2] = dob = dateOfBirth;
        attributes[3] = skol = schoolAttending;
        attributes[4] = relSkol = religiousSchooling;
        attributes[5] = pPhone = personalPhoneNumber;
        attributes[6] = notes = additionalNotes;

    }//constructor

    /**
     * @see struct.DBObject
     * @return a String array wrapped as an Object array containing all the
     *          attributes that make up a dependent in the following order:
     *          firstName, lastName, dateOfBirth, schoolAttending,
     *          religiousSchooling, personalPhoneNumber, additionalNotes
     */
    public Object[] getAttributes(){
        return attributes;
    }
    
    /**
     *
     * @return a String containing...
     */
    public String getReligiousSchooling(){
        return relSkol;
    }

    /**
     *
     * @return a String containing...
     */
    public String getSchoolAttending(){
        return skol;
    }
    
    /**
     *
     * @return a String containing...
     */
    public String getPersonalPhoneNumber(){
        return pPhone;
    }

    /**
     *
     * @return a String containing...
     */
    public String getAdditionalNotes(){
        return notes;
    }

    /**
     * 
     * @return a String containing the first name of the dependent
     */
    public String getFirstName(){
        return first;
    }

    /**
     * 
     * @return a String containing the last name of the dependent
     */
    public String getLastName(){
        return last;
    }

    /**
     * 
     * @return a String containing the birth date for the dependent
     */
    public String getDateOfBirth(){
        return dob;
    }

    /**
     * @see struct.DBObject
     * @return A String array containing the familyName in position 0
     *          and primaryPhoneNumber in position 1
     */
    public String[] getKey(){
        String[] key = new String[numInPrimaryKey];
        key[0] = first;
        key[1] = last;
        key[2] = dob;

        return key;
    }//getKey()
}//Dependent
